package com.aaa.doctor.controller.api;

import com.aaa.doctor.service.PatientFileService;
import com.aaa.entity.PatientFile;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MuChengGuo
 * @date 2023/3/24 17:47
 * Description: TODO
 **/
@Api(tags = "前端 - 病人档案")
@RestController
@RequestMapping("/doctor/api/patientFile")
public class PatientFileApiController {
    @Autowired
    private PatientFileService patientFileService;

    @GetMapping("/getArchiveById/{patientId}")
    @ApiOperation(value = "通过 patientId 查看此患者档案信息 - PatientFile")
    public Result<PatientFile> getPatientById(
            @ApiParam(value = "患者ID", required = true) @PathVariable String patientId) {
        return patientFileService.getPatientById(patientId);
    }
}
